package com.heima.apis.wemedia;


import com.heima.model.admin.dtos.ChannelDto;
import com.heima.model.admin.dtos.NewsAuthDto;
import com.heima.model.admin.dtos.SensitiveDto;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.pojo.ApUser;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "leadnews-wemedia")
public interface IWemediaClient {


    //远程调用增加敏感词
    @PostMapping("/api/v1/sensitive/save")
    public ResponseResult saveSensitive(@RequestBody WmSensitive wmSensitive);

    //删除敏感词
    @DeleteMapping("/api/v1/sensitive/del/{id}")
    public ResponseResult deleteSensitive(@PathVariable("id") Integer id);

    //修改敏感词
    @PostMapping("/api/v1/sensitive/update")
    public ResponseResult updateSensitive(@RequestBody WmSensitive wmSensitive);

    //查询敏感词
    @PostMapping("/api/v1/sensitive/list")
    public ResponseResult selectSensitive(@RequestBody SensitiveDto sensitiveDto);

    //查询新闻列表
    @PostMapping("/api/v1/news/list_vo")
    public ResponseResult selectWmNews(@RequestBody NewsAuthDto dto);


    //查询新闻详情
    @GetMapping("/api/v1/news/onew_vo/{newsId}")
    ResponseResult selectWmNewsById(@PathVariable("newsId") Integer newsId);

    /**
     * 添加自媒体用户
     * @param apUser
     * @return
     */
    @PostMapping("/api/v1/user/addWmUser")
    public ResponseResult addWmUser(@RequestBody ApUser apUser);

    /**
     * 频道保存功能
     *
     * @param
     * @return
     */
    @PostMapping("/api/v1/channel/save")
    public ResponseResult saveChannel(@RequestBody WmChannel wmChannel);

    /**
     * 频道查询功能
     *
     * @param dto
     * @return
     */
    @PostMapping("/api/v1/channel/list")
    public ResponseResult selectChannels(@RequestBody ChannelDto dto);
    /**
     * 频道删除功能
     *
     * @param id
     * @return
     */
    @GetMapping("/api/v1/channel/del/{id}")
    public ResponseResult deleteChannel(@PathVariable Integer id);
    /**
     * 频道修改功能
     *
     * @param
     * @return
     */
    @PostMapping("/api/v1/channel/update")
    public ResponseResult updateChannel(@RequestBody WmChannel wmChannel);

    /**
     * 审核失败
     */

    @PostMapping("/api/v1/news/auth_fail")
    public ResponseResult authFail(@RequestBody NewsAuthDto dto);

    /**
     * 审核成功
     */
    @PostMapping("/api/v1/news/auth_pass")
    public ResponseResult authPass(@RequestBody NewsAuthDto dto);


}
